setwd("~/Dropbox/Shared Folders/Tom Clark - LDA+IRT/CodeForPaper/")	
#setwd('~/Dropbox/DocumentClassProject/CodeForPaper')
library(Matrix)	
source("LDA+IRTFunctions.R")
load("LDA+IRTPaperData.RData")

setburn <- 2000	
setmcmc <- 2000

for (setLDAtopics in c(30,35,55,60)){

	LDAIRT.out <- LDAIRT(WordSparseMatrix, VoteMatrix,LDA.topics= setLDAtopics, save.word.chain=FALSE, save.topic.chain=FALSE, save.ideal.chain=TRUE, save.discrim.chain=FALSE, burn.iter= setburn,mcmc.iter= setmcmc)
	currentfilename <- paste("OptimalTopicCountSearch/SavedLDAIRT-",setLDAtopics,"-",setburn,"-",setmcmc,".RData",sep="")
	save(LDAIRT.out,file=currentfilename)
	rm(LDAIRT.out)
	
} 